package com.audaque.springboot.foshanupload.core.util.encode;

import org.springframework.util.Base64Utils;

import java.nio.charset.StandardCharsets;

/**
 * @author zgb
 * @desc ...
 * @date 2023-12-30 01:01:54
 */
public class SpringBase64Utils {
  public static String encode(String str) {
	return new String(Base64Utils.encode(str.getBytes()));
  }

  public static String decode(String str) {
	return new String(Base64Utils.decode(str.getBytes()), StandardCharsets.UTF_8);
  }


}
